﻿@using Skclusive.Core.Component
@using Skclusive.Mobx.Component
@using Skclusive.Mobx.Observable

@inherits PureComponentBase

<Highlighter>
    <h1>Observable Counter</h1>
    <Count>
        <p>Counter count: <Observable>@currentCount.Value</Observable></p>
    </Count>
    <button class="btn btn-primary" @onclick="IncrementCount">
        Click me
    </button>
</Highlighter>

@code {

    private IObservableValue<int> currentCount = ObservableValue<int>.From(0);

    private void IncrementCount()
    {
        currentCount.Value++;
    }
}
